package com.taoge.electricalAppSystem.dao;

import com.taoge.electricalAppSystem.domain.Product;
import com.taoge.electricalAppSystem.domain.User;
import com.taoge.electricalAppSystem.utils.BaseDAO;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * @author taoge
 * @Date 2024/8/23 19:35
 * @Description
 */
public class DateProduct {
    public static List<Product> proList = new LinkedList<>();
    public static List<User> userList = new LinkedList<>();
    public static List<Product> carList = new ArrayList<Product>();// 保存购物车商品列
    static {
        proList = BaseDAO.selectMutiply("select * from product", Product.class);
        userList = BaseDAO.selectMutiply("select * from user", User.class);
        carList = BaseDAO.selectMutiply("select * from carlist", Product.class);
    }

    public static void update(){
        proList = BaseDAO.selectMutiply("select * from product", Product.class);
    }

}
